package com.ac.api.component.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ac.api.component.entity.CpAttachment;
import com.ac.api.component.vo.CpAttachmentVo;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
    /**
     * <p>
     * 服务类
     * </p>
     *
     * @author mzl
     * @since 2020-07-17
     */
    public interface CpAttachmentService extends IService<CpAttachment> {

        /**
         * 修改照片
         * @param cpAttachmentVo
         * @return
         */
        CpAttachmentVo updateAttachment(CpAttachmentVo cpAttachmentVo);

        /**
         * 保存个人附件
         * @param cpAttachmentVo
         * @return
         */
        CpAttachmentVo saveAttachment(CpAttachmentVo cpAttachmentVo);

        /**
         * 条件查询
         *
         * @param example
         * @return
         */
        List<CpAttachment> list(CpAttachment example);

        /**
         * 分页查询
         *
         * @param example
         * @param page
         * @return
         */
        IPage<CpAttachment> page(CpAttachment example, IPage page);

        /**
         * 根据编码获取对应文件地址
         *
         * @param code
         */
        CpAttachment findByCode(String code);

        /**
         * 根据id获取订单
         *
         * @param ids
         * @return
         */
        List<CpAttachment> findByIds(List<Integer> ids);

        /**
         * 删除
         *
         * @param ids
         * @return
         */
        @Transactional
        Boolean removeByIds(List<Integer> ids);

        /**
         * 分页查询
         *
         * @param example
         * @param page
         * @return
         */
        Page<CpAttachmentVo> findByPage(CpAttachmentVo example, Page page);


    }
